<?php
$this->breadcrumbs = array(
    'Quản lý danh mục sản phẩm' => array('index'),
    'Chi tiết danh mục sản phẩm',
);
?><h3 class="header smaller lighter blue">Chi tiết danh mục sản phẩm</h3>
<?php
$this->widget('zii.widgets.CDetailView', array(
    'data' => $model,
    'attributes' => array(
        'id',
        'name',
        'parent',
        'slug',
        'active',
        'show_index',
        'order_index',
        'show_first_product'
    ),
));
?>
<?php if ($data):
    ?>
    <div>
        <div class="pull-right">
            <div class="btn-group span2">
            </div>

            <div class="widget-toolbar">
                <a href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/create'); ?>" role="button" class="white" data-toggle="modal"  title="Add new language">
                    <i class="icon-plus"></i>
                </a>
            </div>

        </div>
    </div>
    <div class="row-fluid">
        <div class="table-header">
            Loại danh mục sản phẩm
        </div>


        <table id="sample-table-2" class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    <th width="40">STT</th>
                    <th>Thứ tự sắp xếp</th>
                    <th>Tên loại danh mục sp</th>
                    <th>Slug</th>
                    <th>Trạng thái</th>
                    <th></th>
                </tr>
            </thead>

            <tbody>
                <?php
                    foreach ($data as $k => $item) :
                        ?> 
                        <tr>
                            <td class="center">
                                <label>
                                    <?php echo $k + 1; ?>
                                </label>
                            </td>
                            <td>
                                <a href="#"><?php echo $item->order ?></a>
                            </td>
                            <td>
                                <a href="#"><?php echo $item->name ?></a>
                            </td>
                            <td>
                                <?php echo $item->slug ?>
                            </td>
                            <td>
                                <?php
                                if ($item->active == 1)
                                    echo 'Hiển thị';
                                else
                                    echo 'Ẩn';
                                ?>
                            </td>
                            <td class="td-actions">
                                <div class="hidden-phone visible-desktop action-buttons">
                                    <a class="blue" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/viewsub', array('id' => $item->id)); ?>">
                                        <i class="icon-zoom-in bigger-130"></i>
                                    </a>
                                    <a class="green" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/updatesub', array('id' => $item->id)); ?>">
                                        <i class="icon-pencil bigger-130"></i>
                                    </a>
                                    <a class="red" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/deletesub', array('id' => $item->id)); ?>">
                                    <i class="icon-trash bigger-130"></i>
                                </a>
                                </div>
                                <div class="hidden-desktop visible-phone">
                                    <div class="inline position-relative">
                                        <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                            <i class="icon-caret-down icon-only bigger-120"></i>
                                        </button>
                                        <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/view', array('id' => $item->id)); ?>" class="tooltip-info" data-rel="tooltip" title="View">
                                                    <span class="blue">
                                                        <i class="icon-zoom-in bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/update', array('id' => $item->id)); ?>" class="tooltip-success" data-rel="tooltip" title="Edit">
                                                    <span class="green">
                                                        <i class="icon-edit bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>

                                        </ul>
                                    </div>
                                </div>
                            </td>                 


                        </tr>
                        <?php
                    endforeach;
                ?> 
            </tbody>
        </table>
    </div>
<?php endif;
?>